//
//  YSHomeDataTool.h
//  Yueshi
//
//  Created by yueshi_tech on 15/7/15.
//  Copyright (c) 2015年 悦食中国. All rights reserved.
//

#import "BaseDataTool.h"
#import "YSHomeInfoRes.h"
#import "YSHistoryRes.h"
#import "YSReviewsDetailRes.h"
#import "YSCommentRes.h"
#import "YSSetupInfoRes.h"
#import "YSSubscriptModel.h"
#import "YSReviewsMarkRes.h"
#import "YSProductListRes.h"
#import "YSCardMoreRes.h"
#import "YSAdvertRes.h"
#import "YSVideoDetailsRes.h"


@interface YSHomeDataTool : BaseDataTool

/**
 *  获取首页信息
 *  @param pageIndex
 *  @param success
 *  @param failure 
 */
+ (void)getHomeInfo:(NSInteger) pageIndex success:(void (^)(YSHomeInfoRes *result))success failure:(void (^)(NSError *error))failure;

/**
 *  获取往期信息
 *  @param pageIndex 页码
 *  @param success
 *  @param failure
 */
+ (void)getHistoryInfo:(NSInteger)pageIndex success:(void (^)(YSHistoryRes *result))success failure:(void (^)(NSError *error))failure;
/**
 *  内容详情页
 *
 *  @param reviewsId    内容id
 *  @param lastComtId   评论最后一条id，
 *  @param success
 *  @param failure
 */
+ (void)getReviewsDetailWithId:(NSInteger)reviewsId lastComtId:(NSInteger)lastComtId isLogin:(BOOL)isLogin success:(void (^)(YSReviewsDetailRes *result))success failure:(void (^)(NSError *error))failure;
/**
 *  评论
 *
 *  @param reviewsId        内容id
 *  @param commentContent   评论类容
 *  @param targetUserId     回复用户加上
 *  @param success
 *  @param failure
 */
+ (void)recommentWithReviewsId:(NSInteger)reviewsId commentContent:(NSString *)commentContent targetUserId:(NSInteger)targetUserId success:(void (^)(YSCommentRes *result))success failure:(void (^)(NSError *error))failure;

/**
 *  获取启动配置信息
 *
 *  @param success
 *  @param failure
 */
+ (void)getSetupInfo:(void (^)(YSSetupInfoRes *result))success failure:(void (^)(NSError *error))failure;

/**
 *  获取内容池子列表
 *
 *  @param pageIndex
 *  @param entryId
 *  @param success
 *  @param failure
 */
+ (void)getContentPoolWithEntityId:(NSString *)entryId success:(void (^)(YSHistoryRes *result))success failure:(void (^)(NSError *error))failure;
/**
 *  收藏内容
 *
 *  @param reviewsId 内容id
 *  @param type      类型 1 收藏 2删除收藏
 *  @param success
 *  @param failure
 */
+ (void)markReviewsWithReviewsId:(NSString *)reviewsId type:(NSInteger)type success:(void (^)(BaseResponse *result))success failure:(void (^)(NSError *error))failure;
/**
 *  好文收藏列表
 *
 *  @param success
 *  @param failure
 */
+(void)getMarkReviewsListWithPageIndex:(NSInteger)pageIndex success:(void(^)(YSReviewsMarkRes *))success failure:(void (^) (NSError *))failure;
/**
 *  好货收藏列表
 *
 *  @param pageIndex 页码
 *  @param success
 *  @param failure
 */
+(void)getMarkProductListWithPageIndex:(NSInteger)pageIndex success:(void(^)(YSProductListRes *))success failure:(void (^) (NSError *))failure;

/**
 *  角标维护
 *
 *  @param type    类型,1购物篮角标
 *  @param success
 *  @param failure
 */
+ (void)getSubscriptWithType:(NSInteger)type success:(void (^)(YSSubscriptModel *result))success failure:(void (^)(NSError *error))failure;

/**
 *  首页卡片查看更多
 *
 *  @param pageIndex    页码
 *  @param cardId   cardList中 id 卡片id
 *  @param success
 *  @param failure
 */
+ (void)getCardMoreWithCardId:(NSInteger)cardId pageIndex:(NSInteger)pageIndex success:(void (^)(YSCardMoreRes *result))success failure:(void (^)(NSError *error))failure;

/**
 *  视频收藏列表
 *
 *  @param pageIndex 页码
 *  @param success
 *  @param failure
 */
+ (void)getMarkVideoListWithPageIndex:(NSInteger)pageIndex success:(void(^)(YSAdvertRes *))success failure:(void (^) (NSError *))failure;

/**
 *  视频收藏
 *
 *  @param videoId 内容id or 如果为批量删除 则传入 12,212,22  用英文逗号隔开
 *  @param type      类型 1 收藏 2删除收藏
 *  @param success
 *  @param failure
 */
+ (void)markVideoWithVideoId:(NSString *)videoId type:(NSInteger)type success:(void (^)(BaseResponse *result))success failure:(void (^)(NSError *error))failure;

/**
 *  视频详情
 *
 *  @param advertId //视频素材id(素材中新增字段)
 *  @param success
 *  @param failure
 */
+ (void)getVideoDetailsWithAdvertId:(NSInteger)advertId isLogin:(BOOL)isLogin success:(void (^)(YSVideoDetailsRes *result))success failure:(void (^)(NSError *error))failure;

@end

